package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    /**
     * 发布动态
     */
    public String publish(Movement movement);

    PageResult findByUserId(Long userId, Integer page, Integer pagesize);

    List<Movement> findFriendMovements(Integer page, Integer pagesize, Long userId);

    List<Movement> randomMovements(Integer pageSize);

    List<Movement> findMovementsByPids(List<Long> collect);

    Movement findById(String id);

    boolean love(String movementId, Long userId, CommentType love);

    Integer updateLove(Comment comment);

    Integer deleteLove(Comment comment);


    PageResult findByUserIds(Long uid, Integer state, Integer page, Integer pagesize);

    void update(String movementId, Integer state);
}
